package com.yoda.controller.user;

import com.yoda.dto.RegDto;
import com.yoda.mapper.YddUserMapper;
import com.yoda.result.Result;
import com.yoda.service.IYddUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/home/index")
public class HomeIndexController {

    @Autowired
    private IYddUserService userService;

    @PostMapping("/login")
    public Result login(@RequestBody RegDto dto){
        return userService.login(dto);
    }
}
